package com.wondream.myframework.io;

import java.io.File;
import java.io.PrintWriter;

public class PrintWriterTest {

    public static void main(String[] args) {
        PrintWriter pw = null;
        try {
            File file = new File("./logs/print.txt");
            pw = new PrintWriter(file);
            pw.println("我是渣渣辉");
            pw.flush();
        } catch (Exception e){

        } finally {
            try {
                if(pw!=null){pw.close();pw = null;}
            } catch (Exception e){}
        }
    }
}
